package com.bmsbosmpa.service.implement;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bmsbosmpa.dao.IBookDao;
import com.bmsbosmpa.entity.Book;
import com.bmsbosmpa.service.IBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BookService extends ServiceImpl<IBookDao, Book> implements IBookService {

    @Autowired
    private IBookDao bookDao;
    @Override
    public IPage<Book> page(int pageNumber, int size) {
        IPage<Book> page = new Page<>(pageNumber, size);
        bookDao.selectPage(page, null);
        return page;
    }
}
